//
//  HDLabelTextFieldView.swift
//  HuaDaoPeifu
//
//  Created by Erickson on 16/4/13.
//  Copyright © 2016年 paiyipai. All rights reserved.
//

import UIKit

class HDLabelTextFieldView: UIView {

    
    let label = UILabel()
    let textField = UITextField()
    
    
    init() {
        super.init(frame: CGRect.zero)
        self.layer.borderColor = UIColor(hex: 0x999999).cgColor
        self.layer.borderWidth = 0.7
        setupViews()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    func setupViews() {
        
        self.addSubview(label)
        label.font = UIFont.systemFont(ofSize: 15)
        label.textColor = CenterColor.centerHomeCellColor
        label.snp.makeConstraints { (make) in
            make.centerY.equalTo(self)
            make.left.equalTo(13)
            make.width.equalTo(60)
            make.height.equalTo(self)
        }
        
        
        let line = UIView()
        self.addSubview(line)
        line.backgroundColor = UIColor.gray
        line.snp.makeConstraints { (make) in
            make.centerY.equalTo(self)
            make.left.equalTo(label.snp.right)
            make.width.equalTo(0.7)
            make.height.equalTo(18)
        }
        self.addSubview(textField)
        textField.font = UIFont.systemFont(ofSize: 15)
        textField.textColor = UIColor(hex: 0x333333)
        textField.snp.makeConstraints { (make) in
            make.left.equalTo(line.snp.right).offset(12)
            make.centerY.equalTo(self)
            make.top.bottom.equalTo(self)
            make.right.equalTo(self).offset(-12)
        }
    }

}
